import Vue from "vue";
import ElementUI from "element-ui";
// 自定义配色方案
import "./assets/theme/index.css";
import App from "./App.vue";
import router from "./router";
import OpenAnts from "openants"; // 需要引入 OpenAnts
import "openants/lib/openants.css";
import axios from "axios";

// 引用store
import store from "./store";

router.beforeEach((to, from, next) => {
  /* 路由发生变化修改页面title */
  if (to.meta.title) {
    document.title = to.meta.title
  }
  next()
})

Vue.config.productionTip = false;
Vue.use(ElementUI);
Vue.use(OpenAnts); // 将 ElementUI OpenAnts
Vue.prototype.$axios = axios;

Vue.config.devtools = true;

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
